This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Subject: Send email agent does not work: No route to domain xyz.com
Feedback Type: Problem
Product Area: Domino Server
Technical Area: Application development
Platform: Windows XP client
Release: 8.0
Reproducible: -Reproducibility-
hi,
I have a simple agent which is meant to send emails to users based on certain condition.
It works fine if it is run on its own i.e right click>run.
But when it is placed in a WebQueryOpen in a Web Form, it gives me the followinf popular message
No route found to hotmail.com: Check Server, Connection and Domain documents in Domino Directory.
I have set the Mail Routing option to SMTP and also enabled the SMTP Listener task.
The following is the code (taken directly from one of the IBM developers solution page):
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim body As NotesMIMEEntity
Dim header As NotesMIMEHeader
Dim stream As NotesStream
Set db = s.CurrentDatabase
Set stream = s.CreateStream
s.ConvertMIME = False ' Do not convert MIME to rich text
Set doc = db.CreateDocument
doc.Form = "Memo"
Set body = doc.CreateMIMEEntity
Set header = body.CreateHeader("Subject")
Call header.SetHeaderVal("HTML message")
Set header = body.CreateHeader("To")
Call header.SetHeaderVal("psarfaraz@hotmail.com")
Set header = body.CreateHeader("Principal")
Call header.SetHeaderVal("test@salvationarmy.org.uk")
Set header = body.CreateHeader("From")
Call header.SetHeaderVal("test@salvationarmy.org.uk")
Set header = body.CreateHeader("SMTPOriginator")
Call header.SetHeaderVal("test@salvationarmy.org.uk")
Set header = body.CreateHeader("Sender")
Call header.SetHeaderVal("test@salvationarmy.org.uk")
Call stream.writetext(|<HMTL>|)
Call stream.writetext(|<body bgcolor="blue" text="white">|)
Call stream.writetext(|<table border="2">|)
Call stream.writetext(|<tr>|)
Call stream.writetext(|<td>Hello World!</td>|)
Call stream.writetext(|</tr>|)
Call stream.writetext(|</table>|)
user$ = s.CommonUserName 'if scheduled agent this returns the name of the server
'Below uses the ampersand (&) to concatenate user$
Call stream.writetext(|<br><font size="+5" color="red">You have unread messages to approve</font>|)
Call stream.writetext(|</body>|)
Call stream.writetext(|</html>|)
Call body.SetContentFromText(stream, "text/HTML;charset=UTF-8", ENC_IDENTITY_7BIT)
Call doc.Send(False)
s.ConvertMIME = True ' Restore conversion - very important
End Sub
any help would be appreciated.
thanks,
saf
Feedback number WEBB7PVGQX created by ~Martha Xanresaplopoopsi on 03/06/2009